//
//  TestInfoCell.m
//  Molian
//
//  Created by 胡津 on 16/7/15.
//  Copyright (c) 2015年 xiaocan. All rights reserved.
//

#import "TestInfoCell.h"

@implementation TestInfoCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.ico = [[UILabel alloc]initWithFrame:CGRectMake(30, 0, 25, 25)];
        self.ico.layer.masksToBounds = YES;//开启圆角
        self.ico.textColor =[UIColor whiteColor];
        self.ico.textAlignment =  NSTextAlignmentCenter;
        self.ico.backgroundColor = RGBA(212, 217, 220, 1);
        [self.ico.layer setCornerRadius:25/2];
        [self.ico setContentMode:UIViewContentModeScaleAspectFill];
        self.ico.userInteractionEnabled = YES;
        [self.contentView addSubview:self.ico];
        
        
        //名字
        self.neirong = [[UILabel alloc]initWithFrame:CGRectMake(65, 0, DeviceWidth-120, 25)];
        self.neirong.textColor = [UIColor darkGrayColor];
        self.neirong.font = [UIFont fontWithName:FontName size:16];
        self.neirong.numberOfLines = 0;
        [self.contentView addSubview:self.neirong];
        
    

    }
    
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.neirong.frame = CGRectMake(65, 3, DeviceWidth-120, [Utils LabeSizeLabelheight:self.neirong.text Font:[UIFont fontWithName:FontName size:16]].height);
    self.ico.frame = CGRectMake(30, 0, 25, 25);

}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
